<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let i = Math.random() * 10;
    console.log(i);
    console.log(i.toFixed(2));//保留小数位，且四舍五入

    let b = false;
    // b.valueOf()
</script>
</body>
</html>